﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

namespace Project
{
    public class Login
    {
        //public DataTable GetData(string U, string p)
        //{
        //    DataTable dt = new DataTable();
        //    string sqltext = "SELECT * FROM Table_AdminLogin WHERE Admin_User = '" + U + "' and Admin_Password ='" + p + "'; ";
        //    string Connection = ConfigurationManager.ConnectionStrings["DB_UdrinkConnectionString"].ConnectionString;
        //    SqlConnection sqlconn = new SqlConnection(Connection);
        //    SqlDataAdapter da = new SqlDataAdapter(sqltext, sqlconn);
        //    DataSet ds = new DataSet();
        //    da.Fill(ds);

        //    return ds.Tables[0];
        //}
        public DataTable GetData_Empoyee(string U)
        {
            DataTable dt = new DataTable();
            string sqltext = "SELECT * FROM TB_Employee WHERE Employee_ID = '" + U + "'; ";
            string Connection = ConfigurationManager.ConnectionStrings["DB_UdrinkConnectionString"].ConnectionString;
            SqlConnection sqlconn = new SqlConnection(Connection);
            SqlDataAdapter da = new SqlDataAdapter(sqltext, sqlconn);
            DataSet ds = new DataSet();
            da.Fill(ds);

            return ds.Tables[0];
        }
    }
}